#!/bin/bash

for testservicever in `kubectl describe deployments -n lova-test|grep Image:|grep -v springcloud|awk -F / '{print $3}'`
do
   testservice=`echo $testservicever|awk -F : '{print $1}'`
   testver=`echo $testservicever|awk -F : '{print $2}'`
   for perfservicever in `kubectl describe deployments -n lova-perf  --kubeconfig=/root/.kube/config-perf|grep Image:|grep -v springcloud|awk -F / '{print $3}'`
   do
     perfservice=`echo $perfservicever|awk -F : '{print $1}'`
     perfver=`echo $perfservicever|awk -F : '{print $2}'`
     if [[ $testservice == $perfservice ]];then
       if [[ $testver == $perfver ]];then
          sleep 0.1
       else
          echo "test&perf $testservicever not equal $perfservicever"
       fi
     fi
   done
done
